<?php
// include function files for this application
require_once('/home/domains/uny-con.com/public_html/uny-con_fns.php');
if (!session_id()) { session_start(); }
  do_html_header("Resetting password", staysmall, $uny);

  //creating short variable name
  $username = $_POST['username'];
  $username = strtolower($username);
  $email_addr = $_POST['email_addr'];
  $email_addr = strtolower($email_addr);

$password=reset_password($username, $email_addr);
  if ($password != false)
  { 
    if (notify_password($username, $password))
      echo 'Your new password has been sent to your email address.';
    else
      echo 'Your password could not be mailed to you.'
           .' Try pressing refresh.';
  }
  else
    echo 'Your password could not be reset - please try again later.';

   do_html_url('login.php', 'Login');

print_brs(6);
  do_html_footer(news);
?>